package com.jieao.content.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jieao.common.core.domain.BaseEntity;
import com.jieao.framework.util.ShiroUtils;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * @Description 文章
 * @Author weifanl
 * @Date2020/5/21 15:34
 **/
@Data
@TableName("content_album")
@EqualsAndHashCode(callSuper = true)
public class Album extends BaseEntity {
    private static final long serialVersionUID = 1L;
    @TableId
    private Long id;                    //文章id
    private Long catalogId;            //目录id
    private String sourceUrl;          //资源url
    private String desca;              //文章描述
    private String isRelease;          //是否发布
    private String isDown;             //是否可以评论
    /**
     * 发布时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date releaseTime;

    private Integer downNum;            //下载次数
    private String albumSort;           //排序
    private Integer delFlag;            //删除标志（0代表存在 2代表删除）

    public Album() {
        this.delFlag = 0;
        setUpdateBy(ShiroUtils.getLoginName());
    }
}
